import QQMapWX from '@/common/libs/qqmap-wx-jssdk.min.js' //引入下载的js// 腾讯地图经纬度转中文地址
export function getAddress(lng, lat) {
	return new Promise((resove, reject) => {
		const qqmapsdk = new QQMapWX({
			key: 'ADZBZ-YXNC7-MV4XK-P3I73-63YNS-YSBHW'
		})
		qqmapsdk.reverseGeocoder({
			location: {
				latitude: lat,
				longitude: lng,
			},
			success: (res) => {
				resove(res)
			},
			fail: (e) => {
				reject(e)
				uni.showToast({
					title: `${e.message}无法显示位置信息`,
					duration: 2000,
					icon: 'none',
				})
			},
		})
	})
}